1. Technical Field
This disclosure relates generally to configuration and build environments in a data processing system and more specifically to interdependent task management for configuration and build environments in data processing systems.
2. Description of the Related Art
A defined build process is a required overhead task that ensures software in a development project is repeatedly built in the same manner each time a build is executed. As the build process becomes more complex due to scale of additional tasks or combinations of tasks there is an increased need to achieve standardization. Standardization requires effective management of the process and therefore the sequencing of operations.
An effectively defined and managed build process is an essential part of any development cycle. Typically an effectively managed build process removes many issues related to build and configuration operations that may lead to increased cost in the form of project time and money. A typical tool used by developers for build process management is a tool called Ant. Ant is a platform-independent scripting tool. Ant enables a software developer to construct build scripts used to automate the build or configuration process for a configuration project. Ant is a project that is managed by and available by download from the Apache Software Foundation as part of the Jakarta project.
A configuration project, for example build automation, consists of multiple tasks and prerequisite tasks in a predetermined sequence. A requirement is that the project should be able to run in either of two modes. In a first mode the entire project is executed to build up the environment and is referred to as the build mode. In a second mode, only one or more of the tasks are executed to configure certain portions of the already built environment and is referred to as the configure mode.
For example, in the project prerequisite task 1 is an environment setup general task. Prerequisite task 1 is therefore required by each single task. Prerequisite task 1 may also contain subtasks similar to prerequisite task 2 or prerequisite task 3, and is required to be executed only once per execution, in either build mode or configure mode.
Certain tasks, such as a prerequisite task 2 and a prerequisite task 3 are required by more than one task. These prerequisite tasks can only invoked once per execution cycle, in either of the build mode or configuration mode. Prerequisite task 2 is a time-consuming task. Invoking prerequisite task 2 more than once means a performance loss. Prerequisite task 3 is a task such as decrypting a password. Invoking prerequisite task 3 more than once per cycle means a functional error. A difficulty arises when defining a dependency relationship to enable flexible execution of the project in either of the two modes, while meeting the requirement of running certain tasks only once per execution.
The Ant build tool provides a keyword of “depends” to solve part of the inter-dependency issue, but not a complete solution. Ant uses the keyword “depends” to describe the dependency relationship and the parent tasks are executed before the depending ones.
For example, using ANT, in a first case, explicitly declares each dependency relationship as the following: Task 1 (default task) depends Prereq1, Prereq3; Task 2 depends Prereq1, Prereq2; Task 3 depends Prereq1, Prereq2; . . . Task n depends Prereq1, Prereq3, Prereqn. When running in the build mode, Prereq1, Prereq2 and Prereq3 are executed repeatedly. Using Ant, in a second case, declare Prereq1 for the default task only Task 1 (default task) depends Prereq1, Prereq3; Task 2 depends Prereq2; Task 3 depends Prereq2; . . . Task n depends Prereq3, Prereqn. The second case solves the problem for Prereq1 in only the build mode. A Prereq2 and Prereq3 problem still exists. However a new problem is encountered, because of the change, which is Prereq1 is missing when running the script in configure mode, for instance, Task 2 only.